package com.sihai.ehr.model.biz;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

import com.sihai.core.BaseEntity;
import com.sihai.ehr.model.sys.InviteEnum;
import com.sihai.ehr.model.sys.Organization;

/**
 * 面试安排对象
 *
 * @author Henry-PC
 *
 */
@Entity
public class InterviewArrange extends BaseEntity<Long> {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 5498480015368374318L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	/** 组织结构 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "organization_id")
	private Organization organization;

	/** 职务ID */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "duty_id")
	private Duty duty;

	/** 职等ID */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "grade_id")
	private Grade grade;
	/** 面试时间 */
	private Date interviewTime;

	/** 求职人员简历[员工]编号 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "resume_id")
	private EmployeeinfoBase employeeinfoBase;

	/** 初试员工ID */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "interview_first_id")
	private EmployeeinfoBase interviewFirst;
	/** 初试结果状态 */
	@Enumerated(EnumType.STRING)
	private InviteEnum interviewFirstResult;
	/** 复试人员ID */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "interview_retrial_id")
	private EmployeeinfoBase interviewRetrial;

	/** 复试结果状态 */
	@Enumerated(EnumType.STRING)
	private InviteEnum interviewRetrialResult;

    /** 面试结果状态 */
    @Enumerated(EnumType.STRING)
    private InviteEnum interviewResult;

    /** 报到时间 */
    private Date reportTime;
	/** 结果状态 */
	@Enumerated(EnumType.STRING)
	private InviteEnum checkin;

	/** 备注 */
	private String remark;

	/** 1-删除，0-使用 */
	@Column(length = 1)
	private boolean cancel;

	@Override
	public Long getId() {
		// TODO Auto-generated method stub
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Organization getOrganization() {
		return organization;
	}

	public void setOrganization(Organization organization) {
		this.organization = organization;
	}

	public Duty getDuty() {
		return duty;
	}

	public void setDuty(Duty duty) {
		this.duty = duty;
	}

	public Grade getGrade() {
		return grade;
	}

	public void setGrade(Grade grade) {
		this.grade = grade;
	}

	public Date getInterviewTime() {
		return interviewTime;
	}

	public void setInterviewTime(Date interviewTime) {
		this.interviewTime = interviewTime;
	}
	
    public EmployeeinfoBase getEmployeeinfoBase() {
		return employeeinfoBase;
	}

	public void setEmployeeinfoBase(EmployeeinfoBase employeeinfoBase) {
		this.employeeinfoBase = employeeinfoBase;
	}

	public EmployeeinfoBase getInterviewFirst() {
		return interviewFirst;
	}

	public void setInterviewFirst(EmployeeinfoBase interviewFirst) {
		this.interviewFirst = interviewFirst;
	}

	public InviteEnum getInterviewFirstResult() {
		return interviewFirstResult;
	}

	public void setInterviewFirstResult(InviteEnum interviewFirstResult) {
		this.interviewFirstResult = interviewFirstResult;
	}

	public EmployeeinfoBase getInterviewRetrial() {
		return interviewRetrial;
	}

	public void setInterviewRetrial(EmployeeinfoBase interviewRetrial) {
		this.interviewRetrial = interviewRetrial;
	}

	public InviteEnum getInterviewRetrialResult() {
		return interviewRetrialResult;
	}

	public void setInterviewRetrialResult(InviteEnum interviewRetrialResult) {
		this.interviewRetrialResult = interviewRetrialResult;
	}

    public InviteEnum getInterviewResult() {
        return interviewResult;
    }

    public void setInterviewResult(InviteEnum interviewResult) {
        this.interviewResult = interviewResult;
    }

    public Date getReportTime() {
        return reportTime;
    }

    public void setReportTime(Date reportTime) {
        this.reportTime = reportTime;
    }

    public InviteEnum getCheckin() {
		return checkin;
	}

	public void setCheckin(InviteEnum checkin) {
		this.checkin = checkin;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public boolean getCancel() {
		return cancel;
	}

	public void setCancel(boolean cancel) {
		this.cancel = cancel;
	}
}
